/* Serve up the Index Page....
 * 
 * @author david
 *
 */
package org.puresilk.app.pg.actions;

import java.util.logging.Logger;
import javax.servlet.http.HttpServletRequest;
import org.puresilk.app.SilkAction;

/**
 * Index page manager with the content
 * display for sub pages.
 * 
 * @author david
 *
 */
public class Index extends SilkAction {
	private static Logger logger = Logger.getLogger(Index.class.getName());
	
	@Override
	public String execute(HttpServletRequest req) {
		// check for specific content
		String page = req.getParameter("page");
		
		String nxtPage = (page == null ? "/index.jsp" : "/content/" + page.toLowerCase() + ".jsp");
		
		logger.severe("~~ Getting " + nxtPage);
		
		return nxtPage;
	
	}
}
